<button id="btn">获取event对象</button>
<script>
var btn=document.getElementById('btn');
btn.onclick=function(e){
    var event=e||window.event;
    console.log(event);
};
</script>